<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <title>
    PRAW Connection refused : Forums : PythonAnywhere
</title>
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta name="description" content="Forums : PythonAnywhere">
        <meta name="author" content="PythonAnywhere LLP">
        <meta name="google-site-verification" content="O4UxDrfcHjC44jybs2vajc1GgRkTKCTRgVzeV6I9V14" />

        <!-- Le styles -->
        <link href="/static/bootstrap/css/bootstrap.css" rel="stylesheet">
        <link href="/static/bootstrap/css/bootstrap-responsive.css" rel="stylesheet">
        <link href="/static/anywhere/styles/bootstrap_base.css" rel="stylesheet">
        
    
    <link rel="stylesheet" href="/static/anywhere/styles/forums.css" type="text/css" media="screen" charset="utf-8" />

    <link rel="stylesheet" href="/static/pygments/style.css" type="text/css" media="screen" charset="utf-8" />

        <link rel="stylesheet" href="/static/jquery/jquery-ui-1.8.11.custom.css" type="text/css" media="screen" charset="utf-8" />
        
    
    <link rel="alternate" type="application/rss+xml" title="RSS" href="/forums/topic/665/rss" />

        <style type="text/css">
            body {
                height: auto;
            }
        </style>
        <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
        <!--[if lt IE 9]>
        <script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script>
        <![endif]-->

        <!-- Le fav and touch icons -->
        <link rel="apple-touch-icon" href="images/apple-touch-icon.png">
        <link rel="apple-touch-icon" sizes="72x72" href="images/apple-touch-icon-72x72.png">
        <link rel="apple-touch-icon" sizes="114x114" href="images/apple-touch-icon-114x114.png">
    </head>

     <body>
        <div class="navbar navbar-fixed-top">
            <div class="navbar-inner">
                <div id="id_internal_nav_bar_container" class="container">
                    <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    </a>
                    <a class="brand" href="/"><img id="id_logo" src="/static/anywhere/images/logo-234x35.png" height="35" title="PythonAnywhere logo" alt="PythonAnywhere logo" /></a>
                    <div class="nav-collapse">
                        <ul id="id_header_links" class="nav">
                            <li><a id="id_feedback_link" class='feedback_link' href="">Send feedback</a></li>
                            <li><a id="id_forums_link" href="/forums/">Forums</a></li>
                            <li><a href="/wiki/" id="id_help_link">Help</a></li>
                            <li><a href="http://blog.pythonanywhere.com/" id="id_blog_link">Blog</a></li>
                            
                            
                                <li><a style="font-weight: bold;" href="/pricing/" id="id_pricing_link">Pricing & signup</a></li>
                                <li><a href="/login/?next=/forums/topic/665/" id="id_login_link">Log in</a></li>
                            
                        </ul>
                    </div>
                </div>
            </div>
        </div>

        <div class="top-container" id="id_dummy"></div>

        

        
    
    <div class="container">
        <div class="row">
            <div class="span8 offset3">
                <h1>PythonAnywhere Forums</h1>
            </div>
        </div>



    <div class="row">
        <div class="span8 offset3">
            <p>
                <a href="/forums/start_topic/" id="id_start_new_topic">Start a new topic</a> |
                <a href="/forums/">Back to all topics</a> |
                <a href="/forums/topic/665/rss">This topic's RSS</a>
            </p>
        </div>
    </div>
    <div class="row">
        <div class="span8 offset3 topic">
            <h2>PRAW Connection refused</h2>
        </div>
    </div>

    
        <div class="row">
            <div id="id_post_4858" class="span8 offset3 post">
                <div class="row">
                    <div id="id_post_4858_content_text" class="span8">
                        <p>Hi,</p>
<p>I'm having trouble reaching reddit with PRAW. There are a couple other threads with similar problems <a href="https://www.pythonanywhere.com/forums/topic/628/">SocketError when using PRAW</a> and <a href="https://www.pythonanywhere.com/forums/topic/623/">Did something change last night?...</a>. I'm able to wget the same endpoint using the same user-agent.</p>
<div class="codehilite"><pre><span class="nx">Traceback</span> <span class="p">(</span><span class="nx">most</span> <span class="nx">recent</span> <span class="nb">call</span> <span class="nb">last</span><span class="p">):</span>
  <span class="nb">File</span> <span class="s2">&quot;testpraw.py&quot;</span><span class="p">,</span> <span class="nb">line</span> <span class="mi">7</span><span class="p">,</span> <span class="k">in</span> <span class="o">&lt;</span><span class="nx">module</span><span class="o">&gt;</span>
    <span class="nb">for</span> <span class="n">submission</span> <span class="k">in</span> <span class="nx">subreddit.get_hot</span><span class="p">(</span><span class="n">limit</span><span class="o">=</span><span class="mi">5</span><span class="p">):</span>
  <span class="nb">File</span> <span class="s2">&quot;/home/mikenon/.local/lib/python2.7/site-packages/praw/__init__.py&quot;</span><span class="p">,</span> <span class="nb">line</span> <span class="mi">434</span><span class="p">,</span> <span class="k">in</span> <span class="nx">get_content</span>
    <span class="n">page_data</span> <span class="o">=</span> <span class="bp">self.</span><span class="nx">request_json</span><span class="p">(</span><span class="nb">url</span><span class="p">,</span> <span class="k">params</span><span class="o">=</span><span class="k">params</span><span class="p">)</span>
  <span class="nb">File</span> <span class="s2">&quot;/home/mikenon/.local/lib/python2.7/site-packages/praw/decorators.py&quot;</span><span class="p">,</span> <span class="nb">line</span> <span class="mi">95</span><span class="p">,</span> <span class="k">in</span> <span class="nx">wrapped</span>
    <span class="k">return_value</span> <span class="o">=</span> <span class="nx">function</span><span class="p">(</span><span class="nx">reddit_session</span><span class="p">,</span> <span class="o">*</span><span class="nx">args</span><span class="p">,</span> <span class="o">**</span><span class="nx">kwargs</span><span class="p">)</span>
  <span class="nb">File</span> <span class="s2">&quot;/home/mikenon/.local/lib/python2.7/site-packages/praw/__init__.py&quot;</span><span class="p">,</span> <span class="nb">line</span> <span class="mi">469</span><span class="p">,</span> <span class="k">in</span> <span class="nx">request_json</span>
    <span class="n">response</span> <span class="o">=</span> <span class="bp">self.</span><span class="nx">_request</span><span class="p">(</span><span class="nb">url</span><span class="p">,</span> <span class="k">params</span><span class="p">,</span> <span class="kd">data</span><span class="p">)</span>
  <span class="nb">File</span> <span class="s2">&quot;/home/mikenon/.local/lib/python2.7/site-packages/praw/__init__.py&quot;</span><span class="p">,</span> <span class="nb">line</span> <span class="mi">342</span><span class="p">,</span> <span class="k">in</span> <span class="nx">_request</span>
    <span class="n">response</span> <span class="o">=</span> <span class="nx">handle_redirect</span><span class="p">()</span>
  <span class="nb">File</span> <span class="s2">&quot;/home/mikenon/.local/lib/python2.7/site-packages/praw/__init__.py&quot;</span><span class="p">,</span> <span class="nb">line</span> <span class="mi">315</span><span class="p">,</span> <span class="k">in</span> <span class="nx">handle_redirect</span>
    <span class="n">timeout</span><span class="o">=</span><span class="nx">timeout</span><span class="p">,</span> <span class="o">**</span><span class="nx">kwargs</span><span class="p">)</span>
  <span class="nb">File</span> <span class="s2">&quot;/home/mikenon/.local/lib/python2.7/site-packages/praw/handlers.py&quot;</span><span class="p">,</span> <span class="nb">line</span> <span class="mi">135</span><span class="p">,</span> <span class="k">in</span> <span class="nx">wrapped</span>
    <span class="n">result</span> <span class="o">=</span> <span class="nx">function</span><span class="p">(</span><span class="nx">cls</span><span class="p">,</span> <span class="o">**</span><span class="nx">kwargs</span><span class="p">)</span>
  <span class="nb">File</span> <span class="s2">&quot;/home/mikenon/.local/lib/python2.7/site-packages/praw/handlers.py&quot;</span><span class="p">,</span> <span class="nb">line</span> <span class="mi">54</span><span class="p">,</span> <span class="k">in</span> <span class="nx">wrapped</span>
    <span class="k">return</span> <span class="nx">function</span><span class="p">(</span><span class="nx">cls</span><span class="p">,</span> <span class="o">**</span><span class="nx">kwargs</span><span class="p">)</span>
  <span class="nb">File</span> <span class="s2">&quot;/home/mikenon/.local/lib/python2.7/site-packages/praw/handlers.py&quot;</span><span class="p">,</span> <span class="nb">line</span> <span class="mi">90</span><span class="p">,</span> <span class="k">in</span> <span class="nx">request</span>
    <span class="n">allow_redirects</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span>
  <span class="nb">File</span> <span class="s2">&quot;/usr/local/lib/python2.7/site-packages/requests/sessions.py&quot;</span><span class="p">,</span> <span class="nb">line</span> <span class="mi">460</span><span class="p">,</span> <span class="k">in</span> <span class="nb">send</span>
    <span class="n">r</span> <span class="o">=</span> <span class="nx">adapter.send</span><span class="p">(</span><span class="nx">request</span><span class="p">,</span> <span class="o">**</span><span class="nx">kwargs</span><span class="p">)</span>
  <span class="nb">File</span> <span class="s2">&quot;/usr/local/lib/python2.7/site-packages/requests/adapters.py&quot;</span><span class="p">,</span> <span class="nb">line</span> <span class="mi">246</span><span class="p">,</span> <span class="k">in</span> <span class="nb">send</span>
    <span class="nx">raise</span> <span class="nx">ConnectionError</span><span class="p">(</span><span class="nx">e</span><span class="p">)</span>
<span class="nx">requests.exceptions.ConnectionError</span><span class="p">:</span> <span class="nx">HTTPConnectionPool</span><span class="p">(</span><span class="n">host</span><span class="o">=</span><span class="s1">&#39;www.reddit.com&#39;</span><span class="p">,</span> <span class="n">port</span><span class="o">=</span><span class="mi">80</span><span class="p">):</span> <span class="k">Max</span> <span class="nx">retries</span> <span class="nx">exceeded</span> <span class="k">with</span> <span class="nb">url</span><span class="p">:</span> <span class="p">/</span><span class="nb">r</span><span class="p">/</span><span class="nx">pics</span><span class="p">/</span><span class="nx">.json</span><span class="o">?</span><span class="n">limit</span><span class="o">=</span><span class="mi">2</span> <span class="p">(</span><span class="nx">Caused</span> <span class="k">by</span> <span class="o">&lt;</span><span class="nb">class</span> <span class="s1">&#39;socket.error&#39;</span><span class="o">&gt;</span><span class="p">:</span> <span class="err">[</span><span class="nx">Errno</span> <span class="mi">111</span><span class="cp">]</span> Connection refused)`
</pre></div>


<p>The script is pretty basic:</p>
<div class="codehilite"><pre><span class="c">#!/usr/bin/python</span>
<span class="kn">import</span> <span class="nn">praw</span>
<span class="kn">from</span> <span class="nn">pprint</span> <span class="kn">import</span> <span class="n">pprint</span>
<span class="n">reddit</span> <span class="o">=</span> <span class="n">praw</span><span class="o">.</span><span class="n">Reddit</span><span class="p">(</span><span class="n">user_agent</span><span class="o">=</span><span class="s">&#39;testing praw /u/mikenon&#39;</span><span class="p">)</span>
<span class="n">subreddit</span> <span class="o">=</span> <span class="n">reddit</span><span class="o">.</span><span class="n">get_subreddit</span><span class="p">(</span><span class="s">&#39;pics&#39;</span><span class="p">)</span>
<span class="k">for</span> <span class="n">submission</span> <span class="ow">in</span> <span class="n">subreddit</span><span class="o">.</span><span class="n">get_hot</span><span class="p">(</span><span class="n">limit</span><span class="o">=</span><span class="mi">2</span><span class="p">):</span>
    <span class="n">pprint</span><span class="p">(</span><span class="nb">vars</span><span class="p">(</span><span class="n">submission</span><span class="p">))</span>
    <span class="k">for</span> <span class="n">comment</span> <span class="ow">in</span> <span class="n">praw</span><span class="o">.</span><span class="n">helpers</span><span class="o">.</span><span class="n">flatten_tree</span><span class="p">(</span><span class="n">submission</span><span class="o">.</span><span class="n">comments</span><span class="p">):</span>
        <span class="n">pprint</span><span class="p">(</span><span class="nb">vars</span><span class="p">(</span><span class="n">comment</span><span class="p">))</span>
</pre></div>


<p>Is it a proxy issue on PA's end? Or is there something I can fix?</p>
<p>Thank you</p>
                    </div>
                </div>
                <div class="row">
                    <div class="span7 post_metadata">
                        <span id="id_post_4858_creator_details">
                            
                                
                            
                            mikenon
                            |
                            3
                            posts
                            |
                            
                        </span>
                        <span id="id_post_4858_created_date">
                            June 2, 2013, 3:43 p.m.
                        </span>
                        |
                        <a href="https://www.pythonanywhere.com/forums/topic/665/#id_post_4858">permalink</a>
                    </div>
                    <div class="span1">
                        
                    </div>
                </div>
            </div>
        </div>
    
        <div class="row">
            <div id="id_post_4863" class="span8 offset3 post">
                <div class="row">
                    <div id="id_post_4863_content_text" class="span8">
                        <p>How does it behave when you're not using PRAW? The proxy server is working fine and showing a lot of hits against reddit. Try using wget or resuests and check the results. Perhaps there's an issue with PRAW.</p>
                    </div>
                </div>
                <div class="row">
                    <div class="span7 post_metadata">
                        <span id="id_post_4863_creator_details">
                            
                                <img src="/static/anywhere/images/staff.png" alt="Staff" title="Staff"/>
                            
                            glenn
                            |
                            418
                            posts
                            |
                            
                                PythonAnywhere staff
                                |
                            
                        </span>
                        <span id="id_post_4863_created_date">
                            June 2, 2013, 8:17 p.m.
                        </span>
                        |
                        <a href="https://www.pythonanywhere.com/forums/topic/665/#id_post_4863">permalink</a>
                    </div>
                    <div class="span1">
                        
                    </div>
                </div>
            </div>
        </div>
    
        <div class="row">
            <div id="id_post_4865" class="span8 offset3 post">
                <div class="row">
                    <div id="id_post_4865_content_text" class="span8">
                        <p>Hi,</p>
<p>Yeah, wget and Requests work. I was under the impression that PRAW was working for people here, though? PRAW has a config option for setting a proxy to use, can/should I put PA's proxy there? Is it just http://proxy.server/ ?</p>
<p>Thanks</p>
                    </div>
                </div>
                <div class="row">
                    <div class="span7 post_metadata">
                        <span id="id_post_4865_creator_details">
                            
                                
                            
                            mikenon
                            |
                            3
                            posts
                            |
                            
                        </span>
                        <span id="id_post_4865_created_date">
                            June 2, 2013, 8:44 p.m.
                        </span>
                        |
                        <a href="https://www.pythonanywhere.com/forums/topic/665/#id_post_4865">permalink</a>
                    </div>
                    <div class="span1">
                        
                    </div>
                </div>
            </div>
        </div>
    
        <div class="row">
            <div id="id_post_4868" class="span8 offset3 post">
                <div class="row">
                    <div id="id_post_4868_content_text" class="span8">
                        <p>I'm thinking the proxy is the speed bump here. Here's what I've scraped up to do some debugging:</p>
<div class="codehilite"><pre><span class="c">#!/usr/bin/python</span>
<span class="kn">import</span> <span class="nn">praw</span>
<span class="kn">import</span> <span class="nn">requests</span>
<span class="kn">import</span> <span class="nn">logging</span>
<span class="kn">import</span> <span class="nn">httplib</span>
<span class="n">httplib</span><span class="o">.</span><span class="n">HTTPConnection</span><span class="o">.</span><span class="n">debuglevel</span> <span class="o">=</span> <span class="mi">1</span>
<span class="n">logging</span><span class="o">.</span><span class="n">basicConfig</span><span class="p">()</span>
<span class="n">logging</span><span class="o">.</span><span class="n">getLogger</span><span class="p">()</span><span class="o">.</span><span class="n">setLevel</span><span class="p">(</span><span class="n">logging</span><span class="o">.</span><span class="n">DEBUG</span><span class="p">)</span>
<span class="n">requests_log</span> <span class="o">=</span> <span class="n">logging</span><span class="o">.</span><span class="n">getLogger</span><span class="p">(</span><span class="s">&quot;requests.packages.urllib3&quot;</span><span class="p">)</span>
<span class="n">requests_log</span><span class="o">.</span><span class="n">setLevel</span><span class="p">(</span><span class="n">logging</span><span class="o">.</span><span class="n">DEBUG</span><span class="p">)</span>
<span class="n">requests_log</span><span class="o">.</span><span class="n">propagate</span> <span class="o">=</span> <span class="bp">True</span>

<span class="c"># Works</span>
<span class="k">print</span> <span class="s">&#39;Making basic Requests get&#39;</span>
<span class="n">requests</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s">&#39;http://www.reddit.com/r/opensource/.json?limit=5&#39;</span><span class="p">)</span>

<span class="c"># Doesn&#39;t work</span>
<span class="k">print</span> <span class="s">&#39;</span><span class="se">\n\n</span><span class="s">Importing PRAW and requesting submissions&#39;</span>
<span class="n">r</span> <span class="o">=</span> <span class="n">praw</span><span class="o">.</span><span class="n">Reddit</span><span class="p">(</span><span class="n">user_agent</span><span class="o">=</span><span class="s">&#39;Trying out PRAW on PythonAnywhere&#39;</span><span class="p">,</span><span class="n">site_name</span><span class="o">=</span><span class="s">&#39;reddit_nossl&#39;</span><span class="p">)</span>
<span class="n">submissions</span> <span class="o">=</span> <span class="n">r</span><span class="o">.</span><span class="n">get_subreddit</span><span class="p">(</span><span class="s">&#39;opensource&#39;</span><span class="p">)</span><span class="o">.</span><span class="n">get_hot</span><span class="p">(</span><span class="n">limit</span><span class="o">=</span><span class="mi">5</span><span class="p">)</span>
<span class="k">print</span> <span class="p">[</span><span class="nb">str</span><span class="p">(</span><span class="n">x</span><span class="p">)</span> <span class="k">for</span> <span class="n">x</span> <span class="ow">in</span> <span class="n">submissions</span><span class="p">]</span>
</pre></div>


<p>Logs for requests.get(url) show</p>
<div class="codehilite"><pre><span class="n">INFO</span><span class="o">:</span><span class="n">requests</span><span class="o">.</span><span class="na">packages</span><span class="o">.</span><span class="na">urllib3</span><span class="o">.</span><span class="na">connectionpool</span><span class="o">:</span><span class="n">Starting</span> <span class="k">new</span> <span class="n">HTTP</span> <span class="n">connection</span> <span class="o">(</span><span class="mi">1</span><span class="o">):</span> <span class="n">proxy</span><span class="o">.</span><span class="na">server</span>
</pre></div>


<p>While requests from PRAW show</p>
<div class="codehilite"><pre><span class="n">INFO</span><span class="o">:</span><span class="n">requests</span><span class="o">.</span><span class="na">packages</span><span class="o">.</span><span class="na">urllib3</span><span class="o">.</span><span class="na">connectionpool</span><span class="o">:</span><span class="n">Starting</span> <span class="k">new</span> <span class="n">HTTP</span> <span class="n">connection</span> <span class="o">(</span><span class="mi">1</span><span class="o">):</span> <span class="n">www</span><span class="o">.</span><span class="na">reddit</span><span class="o">.</span><span class="na">com</span>
</pre></div>


<p>So it would seem there ought to be a way to coerce PRAW into using the proxy.</p>
                    </div>
                </div>
                <div class="row">
                    <div class="span7 post_metadata">
                        <span id="id_post_4868_creator_details">
                            
                                
                            
                            PSBCommentBot
                            |
                            1
                            post
                            |
                            
                        </span>
                        <span id="id_post_4868_created_date">
                            June 3, 2013, 3 a.m.
                        </span>
                        |
                        <a href="https://www.pythonanywhere.com/forums/topic/665/#id_post_4868">permalink</a>
                    </div>
                    <div class="span1">
                        
                    </div>
                </div>
            </div>
        </div>
    
        <div class="row">
            <div id="id_post_4875" class="span8 offset3 post">
                <div class="row">
                    <div id="id_post_4875_content_text" class="span8">
                        <p>May be worth raising it as a bug against PRAW, or as @PSBCommentBot says, try and hack in a fix yourself...</p>
                    </div>
                </div>
                <div class="row">
                    <div class="span7 post_metadata">
                        <span id="id_post_4875_creator_details">
                            
                                <img src="/static/anywhere/images/staff.png" alt="Staff" title="Staff"/>
                            
                            harry
                            |
                            376
                            posts
                            |
                            
                                PythonAnywhere staff
                                |
                            
                        </span>
                        <span id="id_post_4875_created_date">
                            June 3, 2013, 9:57 a.m.
                        </span>
                        |
                        <a href="https://www.pythonanywhere.com/forums/topic/665/#id_post_4875">permalink</a>
                    </div>
                    <div class="span1">
                        
                    </div>
                </div>
            </div>
        </div>
    
        <div class="row">
            <div id="id_post_5799" class="span8 offset3 post">
                <div class="row">
                    <div id="id_post_5799_content_text" class="span8">
                        <p>I'm getting the same error.  Does this have to do with a non-paid account? (limits, etc)</p>
                    </div>
                </div>
                <div class="row">
                    <div class="span7 post_metadata">
                        <span id="id_post_5799_creator_details">
                            
                                
                            
                            craftshape
                            |
                            1
                            post
                            |
                            
                        </span>
                        <span id="id_post_5799_created_date">
                            Aug. 7, 2013, 4:02 a.m.
                        </span>
                        |
                        <a href="https://www.pythonanywhere.com/forums/topic/665/#id_post_5799">permalink</a>
                    </div>
                    <div class="span1">
                        
                    </div>
                </div>
            </div>
        </div>
    
        <div class="row">
            <div id="id_post_5802" class="span8 offset3 post">
                <div class="row">
                    <div id="id_post_5802_content_text" class="span8">
                        <p>It's really a bug in PRAW -- it doesn't play nicely with the proxy we use for free accounts.  So it will work fine with a paid account, which doesn't use a proxy.</p>
                    </div>
                </div>
                <div class="row">
                    <div class="span7 post_metadata">
                        <span id="id_post_5802_creator_details">
                            
                                <img src="/static/anywhere/images/staff.png" alt="Staff" title="Staff"/>
                            
                            giles
                            |
                            866
                            posts
                            |
                            
                                PythonAnywhere staff
                                |
                            
                        </span>
                        <span id="id_post_5802_created_date">
                            Aug. 7, 2013, 12:49 p.m.
                        </span>
                        |
                        <a href="https://www.pythonanywhere.com/forums/topic/665/#id_post_5802">permalink</a>
                    </div>
                    <div class="span1">
                        
                    </div>
                </div>
            </div>
        </div>
    
        <div class="row">
            <div id="id_post_5852" class="span8 offset3 post">
                <div class="row">
                    <div id="id_post_5852_content_text" class="span8">
                        <p>Was something changed in the backend recently? I'm running a continuous script that was working earlier today, which is now getting this error (although I never restarted it between then and now).</p>
<p>Edit: It looks like PRAW is indeed using the proxy (whatever that means) but it's still giving an error. Traceback:</p>
<div class="codehilite"><pre><span class="nx">Traceback</span> <span class="p">(</span><span class="nx">most</span> <span class="nx">recent</span> <span class="nb">call</span> <span class="nb">last</span><span class="p">):</span>
  <span class="nb">File</span> <span class="s2">&quot;sns.py&quot;</span><span class="p">,</span> <span class="nb">line</span> <span class="mi">154</span><span class="p">,</span> <span class="k">in</span> <span class="o">&lt;</span><span class="nx">module</span><span class="o">&gt;</span>
    <span class="nx">r.login</span><span class="p">(</span><span class="nx">username</span><span class="p">,</span> <span class="nx">password</span><span class="p">)</span>
  <span class="nb">File</span> <span class="s2">&quot;/home/sns/.local/lib/python2.7/site-packages/praw/__init__.py&quot;</span><span class="p">,</span> <span class="nb">line</span> <span class="mi">906</span><span class="p">,</span> <span class="k">in</span> <span class="nx">login</span>
    <span class="bp">self.</span><span class="nx">request_json</span><span class="p">(</span><span class="bp">self.</span><span class="nx">config</span><span class="err">[</span><span class="s1">&#39;login&#39;</span><span class="cp">]</span>, data=data)
  File &quot;/home/sns/.local/lib/python2.7/site-packages/praw/decorators.py&quot;, line 223, in error_check
ed_function
    return_value = function(cls, *args, **kwargs)
  File &quot;/home/sns/.local/lib/python2.7/site-packages/praw/__init__.py&quot;, line 407, in request_json
    response = self._request(url, params, data)
  File &quot;/home/sns/.local/lib/python2.7/site-packages/praw/__init__.py&quot;, line 294, in _request
    timeout=timeout)
  File &quot;/home/sns/.local/lib/python2.7/site-packages/praw/decorators.py&quot;, line 64, in __call__
    result = self.function(reddit_session, url, *args, **kwargs)
  File &quot;/home/sns/.local/lib/python2.7/site-packages/praw/decorators.py&quot;, line 167, in __call__
    return self.function(*args, **kwargs)
  File &quot;/home/sns/.local/lib/python2.7/site-packages/praw/helpers.py&quot;, line 137, in _request
    allow_redirects=False, auth=auth)
  File &quot;/home/sns/.local/lib/python2.7/site-packages/requests/sessions.py&quot;, line 377, in post
    return self.request(&#39;POST&#39;, url, data=data, **kwargs)
  File &quot;/home/sns/.local/lib/python2.7/site-packages/requests/sessions.py&quot;, line 335, in request
    resp = self.send(prep, **send_kwargs)
  File &quot;/home/sns/.local/lib/python2.7/site-packages/requests/sessions.py&quot;, line 438, in send
    r = adapter.send(request, **kwargs)
  File &quot;/home/sns/.local/lib/python2.7/site-packages/requests/adapters.py&quot;, line 327, in send
    raise ConnectionError(e)
requests.exceptions.ConnectionError: HTTPConnectionPool(host=&#39;proxy.server&#39;, port=3128): Max retri
es exceeded with url: http://www.reddit.com/api/login/.json (Caused by <span class="nt">&lt;class</span> <span class="err">&#39;</span><span class="na">socket</span><span class="err">.</span><span class="na">error</span><span class="err">&#39;</span><span class="nt">&gt;</span>: <span class="cp">[</span><span class="nx">Er</span>
<span class="nx">rno</span> <span class="mi">111</span><span class="cp">]</span> Connection refused)
</pre></div>
                    </div>
                </div>
                <div class="row">
                    <div class="span7 post_metadata">
                        <span id="id_post_5852_creator_details">
                            
                                
                            
                            sns
                            |
                            2
                            posts
                            |
                            
                        </span>
                        <span id="id_post_5852_created_date">
                            Aug. 11, 2013, 5:15 a.m.
                        </span>
                        |
                        <a href="https://www.pythonanywhere.com/forums/topic/665/#id_post_5852">permalink</a>
                    </div>
                    <div class="span1">
                        
                    </div>
                </div>
            </div>
        </div>
    
        <div class="row">
            <div id="id_post_5857" class="span8 offset3 post">
                <div class="row">
                    <div id="id_post_5857_content_text" class="span8">
                        <p>I've bounced the proxy server, just in case.  But if it's still not working, it's probably because the PRAW library is simply incompatible with proxies -- there are several outstanding bugs in, eg, the rquests library and urllib3 which are know to cause problems with HTTPS and proxies.</p>
<p>For now the best solution is to upgrade.  If you switch to a paid account and can't get it to work, we'll happily give you a full refund...</p>
                    </div>
                </div>
                <div class="row">
                    <div class="span7 post_metadata">
                        <span id="id_post_5857_creator_details">
                            
                                <img src="/static/anywhere/images/staff.png" alt="Staff" title="Staff"/>
                            
                            harry
                            |
                            376
                            posts
                            |
                            
                                PythonAnywhere staff
                                |
                            
                        </span>
                        <span id="id_post_5857_created_date">
                            Aug. 11, 2013, 12:21 p.m.
                        </span>
                        |
                        <a href="https://www.pythonanywhere.com/forums/topic/665/#id_post_5857">permalink</a>
                    </div>
                    <div class="span1">
                        
                    </div>
                </div>
            </div>
        </div>
    
        <div class="row">
            <div id="id_post_5870" class="span8 offset3 post">
                <div class="row">
                    <div id="id_post_5870_content_text" class="span8">
                        <p>Everything seems to work now, more smoothly than before even. Thanks!</p>
<p>Now I know, as a free user I'm not really "entitled" to anything, but it does seem a little strange to break previously-working functions of the free accounts and then recommend upgrading as a solution, just saying...</p>
                    </div>
                </div>
                <div class="row">
                    <div class="span7 post_metadata">
                        <span id="id_post_5870_creator_details">
                            
                                
                            
                            sns
                            |
                            2
                            posts
                            |
                            
                        </span>
                        <span id="id_post_5870_created_date">
                            Aug. 12, 2013, 12:37 a.m.
                        </span>
                        |
                        <a href="https://www.pythonanywhere.com/forums/topic/665/#id_post_5870">permalink</a>
                    </div>
                    <div class="span1">
                        
                    </div>
                </div>
            </div>
        </div>
    

    




        <div id="id_footer" class="container">

            <footer id="id_copyright_div">
                <p>
                    Copyright &copy; 2013 PythonAnywhere LLP
                    &mdash;
                    <a href="/terms/">Terms</a>
                    &mdash;
                    <a href="/privacy/">Privacy</a><br/>
                    "Python" is a registered trademark of the Python Software Foundation.
                </p>
            </footer>

        </div>

        
        

        <div id="id_feedback_dialog" title="Help us improve" style="display:none">
    <div id="id_feedback_dialog_blurb_big" class="dialog_blurb_big">
        It's always a pleasure to hear from you!
    </div>
    <div id="id_feedback_dialog_blurb_small">
        Ask us a question, or tell us what you love or hate about PythonAnywhere.<br/>
        We'll get back to you over email ASAP.
    </div>
    <textarea id="id_feedback_dialog_text" rows="6"></textarea>
    <input id="id_feedback_dialog_email_address" type="text" class="default_prompt"/>
    <div id="id_feedback_dialog_error" class="pa_hidden">
        Sorry, there was an error connecting to the server. <br/>Please try again in a few moments...
    </div>
    <div class="dialog_buttons">
        <img id="id_feedback_dialog_spinner" src="/static/anywhere/images/spinner-small.gif" />
        <button class="btn btn-primary" id="id_feedback_dialog_ok_button">OK</button>
        <button class="btn" id="id_feedback_dialog_cancel_button">Cancel</button>
    </div>
</div>


        <!-- Le javascript
        ================================================== -->
        <!-- Placed at the end of the document so the pages load faster -->
        <script type="text/javascript" src="/static/jquery/jquery-1.7.1.min.js"></script>
        <script type="text/javascript" src="/static/jquery/jquery-ui-1.8.11.custom.min.js"></script>
        <script src="/static/bootstrap/js/bootstrap-transition.js"></script>
        <script src="/static/bootstrap/js/bootstrap-alert.js"></script>
        <script src="/static/bootstrap/js/bootstrap-modal.js"></script>
        <script src="/static/bootstrap/js/bootstrap-dropdown.js"></script>
        <script src="/static/bootstrap/js/bootstrap-scrollspy.js"></script>
        <script src="/static/bootstrap/js/bootstrap-tab.js"></script>
        <script src="/static/bootstrap/js/bootstrap-tooltip.js"></script>
        <script src="/static/bootstrap/js/bootstrap-popover.js"></script>
        <script src="/static/bootstrap/js/bootstrap-button.js"></script>
        <script src="/static/bootstrap/js/bootstrap-collapse.js"></script>
        <script src="/static/bootstrap/js/bootstrap-carousel.js"></script>
        <script src="/static/bootstrap/js/bootstrap-typeahead.js"></script>

        <script type="text/javascript">
            var urls = {};
            var Anywhere = {};
            Anywhere.urls = {};
        </script>
        <script type="text/javascript" src="/static/anywhere/scripts/ajax_utils.js"></script>

        <script type="text/javascript" src="/static/anywhere/scripts/feedback_dialog.js"></script>
        
        <script type="text/javascript">
            $(function() {
                $.extend(
                    urls,
                    {
                        feedback: '/feedback/submit/'
                    }
                );
                
                    Anywhere.FeedbackDialog.Initialise(urls, false);
                
            });
        </script>

        <script type="text/javascript">

            var _gaq = _gaq || [];
            _gaq.push(['_setAccount', 'UA-18014859-6']);
            _gaq.push(['_trackPageview']);

            (function() {
                var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
                ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
                var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
            })();

        </script>

        



    </body>
</html>
